<!--
    By:JmwPower
    Copy:https://github.com/JMWpower/xiaojiejie
    Copy:https://gitee.com/JmwPower/xiaojiejie
    温馨提示：本页面仅供学习参考，请勿分享传播商用，请您在下载后的24H进行删除！本项目开源，请勿在源码分享站点付费下载。
    以上信息使用时请保留，谢谢！Thanks♪(･ω･)ﾉ
-->
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="google" value="notranslate">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<meta name=author content="Jmw-Power`top|JmwPower">
<meta name=description content="Jmw-Power`top|小姐姐 优质短视频播放小站，仿短视频App播放操作模式，网页版无需安装APP，即开即用，可登录收藏你所喜欢的小姐姐视频！温馨提示：本页面仅供学习参考，请勿分享传播商用，请您在下载后的24H进行删除！本项目开源，请勿在源码分享站点付费下载。">
<meta name=keywords content="xiaojiejie, xjj, 小姐姐, 抖音, 快手, 福利, Jmw-Power`top, JmwPower">
<title>JMW-|-小姐姐</title>
<link rel="stylesheet" type="text/css" href="./css/pc.css">
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link rev="made" href="https://github.com/JMWpower/xiaojiejie">
<link rev="made" href="https://gitee.com/JmwPower/xiaojiejie">
<script type="text/javascript">
    if(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {window.location.href = "index.html";}
</script>
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?86194243b3d0dc98474adb8d6755d003";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>
<body>
	<span style="position:absolute;top:15px;left:8vw;color:#fff;font-size:16px;">
		<strong style="font-size:18px;">JMW-xiaojiejie</strong>   | 看见美好生活
	</span>
	<div class="app">
		<div>
		    <video id="player" preload autoplay webkit-playsinline='true' playsinline='true' x-webkit-airplay='true' x5-video-player-type='h5' x5-video-player-fullscreen='true' x5-video-ignore-metadata='true' controlslist="nodownload" poster="./img/bg.jpg"></video>
		</div>
		<div class="box">
			<div style="padding-top:10px;padding-left:40px;background-color: #0E0F1A;">
				<img src="./img/logo.png" style="border-radius:20px;width:32px;height:32px;background-color: #fff;">
			    <span style="color:#fff;padding-left:12px;font-size:16px;background-color: #0E0F1A;" id="userid">@Jmw`Power</span>
			</div>
			<div style="padding-top:15px;padding-left:20px;padding-right:20px;background-color: #0E0F1A;">
			    <span style="color:#fff;color: #999999;background-color: #0E0F1A;">本程序仅作研究学习演示，视频采集自网络;原作者拍摄创作不易，请勿下载传播!</span>
			</div>
			<div style="padding-top: 15px;padding-left: 40px;padding-right:40px;background-color: #0E0F1A;text-align: center;font-size:14px;">
				<span style="color: #FF4040;background-color: #0E0F1A;">点击来源切换数据源</span><br>
			    <span style="color: #4682B4;background-color: #0E0F1A;">点击爱心按钮收藏</span>
			</div>
			<div style="padding-top: 15px;padding-left: 20px;padding-right:20px;background-color: #0E0F1A;text-align: center;">
				<span style="color:#fff;background-color: #0E0F1A;">点击按钮选择【连续】/【循环】模式</span><br>
				<span style="color:#fff;background-color: #0E0F1A;">点击【PASS】按钮刷新播放下一个</span><br>
			    <span style="color:#fff;background-color: #0E0F1A;">单击视频 播放/暂停</span><br>
			    <span style="color:#fff;background-color: #0E0F1A;">双击视频进入 全屏播放</span><br>
			</div>
			<div style="padding-top: 15px;padding-left: 20px;padding-right:20px;background-color: #0E0F1A;text-align: center;">
				<button id="bth" class="xhms">单视频循环播放</button>
			</div>
			<div style="padding-top: 15px;padding-left: 20px;padding-right:20px;background-color: #0E0F1A;text-align: center;">
				<button class="pass" onclick="players();">PASS</button>
			</div>
			<div style="padding-top: 15px;padding-left: 20px;padding-right:20px;background-color: #0E0F1A;text-align: center;">
				<img src="./img/love.png" id="love" style="background-color: #0E0F1A;border-radius:10px;width:38px;height:38px;" title="点击喜欢按钮收藏">
			</div>
			<div style="padding-top: 15px;padding-left: 20px;padding-right:20px;background-color: #0E0F1A;text-align: center;">
				<button id="yuan">当前数据源【精品】</button>
			</div>
		    <div style="padding-top: 15px;padding-left: 20px;padding-right:20px;background-color: #0E0F1A;text-align: center;">
		    	<span style="color:#fff;">扫描下方二维码.使用手机播放</span><br>
				<img src="./img/ewm.png" style="width:88px;height:88px;"><br>
				<strong style="color:#fff;">http://xjj.jmwpower.top/</strong>
			</div>
		</div>
	</div>
	<div class="bom">
		<div style="text-align: center;color:#fff;">
			<strong>本程序仅作研究学习演示，数据采集自网络;原作者拍摄创作不易，请勿下载传播!</strong>
		</div>
	</div>
</body>

<div class="login" id="dlym" style="height:320px;">
    <div class="login-title">ID*组·收藏登入<span><a class="close-login">关闭</a></span></div>
    <div class="login-input-content">
        <div class="login-input">
            <label>ID*组·账号：</label>
            <input type="text" placeholder="ID*组·账号（建议使用易记的纯数字）"  id="username" class="list-input"/>
        </div>
        <strong>温馨提示：</strong>
        <span>1.本收藏功能为开放性ID组账号收藏体验，ID*组·账号不设密码，如已存在同ID组账号，即会在原ID组账号上添加收藏数据，您可以公开您的ID组账号给您志同道合的好友们；添加的收藏数据暂不支持取消，不支持删除ID组账号，请您谨慎操作！</span>
        <span>2.点击来源显示按钮切换到收藏源即可浏览当前ID组账号收藏的数据。</span>
    </div>
    <div class="login-button"><a id="login">登录账号</a></div>
</div>
<div class="login-bg"></div>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/layer/3.1.1/layer.min.js"></script>
<script>
$(document).ready(function(){
    auto = false;
    gi = 1;
    gi = 1;//初始化GET链接序号
    gi_max = 3;//最大GET链接序号
    url = "./get/get1.php";
    vdurl = "./demo.mp4";
    player = document.getElementById("player");
    players();
 
    $("#bth").on("click", function(){
        auto = !auto;
        this.innerText = (auto ? '自动连续播放下一个' : '单视频循环播放');
        this.className = (auto ? 'zdlb' : 'xhms');
    });

    $("#love").on("click", function(){
    	user = $.cookie('user');
	    if (user == null) {
	    	$('#dlym').show();
	    	$('.login-bg').show();
		} else {
			$.post("post.php",{userid:user,datastr:vdurl},function(datat,status){
				dataobj = JSON.parse(datat);
				if (dataobj.status == "YES") {
					$("#love").attr('src','./img/loves.png'); 
					console.log(dataobj.message);
				}else{
					console.log(dataobj.message);
				}
			});
		}
    });

    $("#userid").on("click", function(){
    	user = $.cookie('user');
	    if (user == null) {
	    	$('#dlym').show();
	    	$('.login-bg').show();
		} else {
			$.removeCookie('user'); //删除cookie
			$("#userid").html("@Jmw-Power");
			$("#username").val("");
		}
    });

    $('.close-login').click(function(){
        $('#dlym').hide();
        $('.login-bg').hide();
    });

    $("#yuan").on("click", function(){
    	if (gi < gi_max) {
    		gi = gi + 1;
    		this.innerText = "当前源【00" + gi + "】";
    		if (gi>9) {this.innerText = "当前源【0" + gi + "】";}//大于9，缺省0
    		if (gi==2) {this.innerText = "当前源【JSON】";}
    		url = "./get/get" + gi + ".php";
    	} else if (gi = gi_max) {
			var user = $.cookie('user');
			if (user != null) {
				gi = 0;
				$("#userid").html('@'+user);
				this.innerText = "当前源【收藏】";
				url = ("./get/get.php?user=" + user);
			} else {
				$("#userid").html('@Jmw-Power');
				gi = 1;
	    		this.innerText = "当前源【精品】";
	    		url = "./get/get" + gi + ".php";
			}
    	}
        console.log(url);
    });

    player.addEventListener('ended', function () {
        console.log("播放结束");
        if (auto == false) {
            player.play();
        } else {
            players();
        }
    }, false);

    touchtime = new Date().getTime();
    $("#player").on("click", function(){
        if( new Date().getTime() - touchtime < 500 ){
            console.log("dblclick");
            FullScreen();
        }else{
            touchtime = new Date().getTime();
            console.log("click");
            if (player.paused) {
                player.play();
            } else {
                player.pause();
            }
        }
    });
});

function players() {
    $.get(url,function(data,status){
        if (status==status) {
            console.log("成功获取数据！");
            vdurl = data;
            console.log(data);
            if(vdurl.indexOf("M3U8") >= 0 || vdurl.indexOf("m3u8") >= 0) {
                players();
            }else{
                player.src = data;
                player.play();
            }
            if (gi==0) {
            	$("#love").attr('src','./img/loves.png');
            } else {
            	$("#love").attr('src','./img/love.png');
            }
            if (gi != 8 || pds != 999) {
    			$.ajax({type: 'GET',url: data,complete: function(response) {
    				if(response.status != 200) {
    					console.log(response.status);
    					players();
    				}
    			}});
            }
        } else {
            console.log("失败，重新发起请求！");
            players();
        }
    });
}

//进入全屏
function FullScreen() {
    if (player .requestFullscreen) {
        player .requestFullscreen();
        player.play();
    } else if (player .mozRequestFullScreen) {
        player .mozRequestFullScreen();
        player.play();
    } else if (player .webkitRequestFullScreen) {
        player .webkitRequestFullScreen();
        player.play();
    }
}

$(document).ready(function(){
	var user = $.cookie('user');
	if (user != null) {
		$("#userid").html('@'+user);
	} else {
		$("#userid").html('@Jmw-Power');
	}
});

$("#login").on("click", function(){
	var usernames = document.getElementById('username').value;
    if (usernames.replace(/(^\s*)|(\s*$)/g, "") == "") {  //----判断是否为空或者空格---
        alert("请注意，账号内容不能为空！");
        username.focus();
        return;//------如果为空，阻止函数继续往下执行----
    } else {
	    $.post("login.php",{username:usernames},function(datalogin,status){
	        	objlogin = JSON.parse(datalogin);
	        	if (objlogin.status == "YES") {
	        		$("#userid").html('@'+usernames);
	        		$.cookie('user', usernames);
	        		$('#dlym').hide();
			        $('.login-bg').hide();
			        alert(objlogin.message);
	        	}else{
	        		alert(objlogin.message);
	        	} 
	        });
    }
});
</script>
</html>